/************************************************************
  *  * EaseMob CONFIDENTIAL 
  * __________________ 
  * Copyright (C) 2013-2014 EaseMob Technologies. All rights reserved. 
  *  
  * NOTICE: All information contained herein is, and remains 
  * the property of EaseMob Technologies.
  * Dissemination of this information or reproduction of this material 
  * is strictly forbidden unless prior written permission is obtained
  * from EaseMob Technologies.
  */

#import <UIKit/UIKit.h>

typedef UITableViewCell * (^cellForRowAtIndexPathCompletion)(UITableView *tableView, NSIndexPath *indexPath);;
typedef BOOL (^canEditRowAtIndexPath)(UITableView *tableView, NSIndexPath *indexPath);
typedef CGFloat (^heightForRowAtIndexPathCompletion)(UITableView *tableView, NSIndexPath *indexPath);
typedef void (^didSelectRowAtIndexPathCompletion)(UITableView *tableView, NSIndexPath *indexPath);
typedef void (^didDeselectRowAtIndexPathCompletion)(UITableView *tableView, NSIndexPath *indexPath);

@interface EMSearchDisplayController : UISearchDisplayController<UITableViewDataSource, UITableViewDelegate, UISearchDisplayDelegate>

@property (strong, nonatomic) NSMutableArray *resultsSource;

//编辑cell时显示的风格，默认为UITableViewCellEditingStyleDelete；会将值付给[tableView:editingStyleForRowAtIndexPath:]
@property (nonatomic) UITableViewCellEditingStyle editingStyle;

@property (copy) UITableViewCell * (^cellForRowAtIndexPathCompletion)(UITableView *tableView, NSIndexPath *indexPath);
@property (copy) BOOL (^canEditRowAtIndexPath)(UITableView *tableView, NSIndexPath *indexPath);
@property (copy) CGFloat (^heightForRowAtIndexPathCompletion)(UITableView *tableView, NSIndexPath *indexPath);
@property (copy) void (^didSelectRowAtIndexPathCompletion)(UITableView *tableView, NSIndexPath *indexPath);
@property (copy) void (^didDeselectRowAtIndexPathCompletion)(UITableView *tableView, NSIndexPath *indexPath);

/// 基本tableview 的快速实现 行高  cell自定义  和点击方法
-(void)zyCellForRowAtIndexPath:(cellForRowAtIndexPathCompletion)cellCompletion withHeightForRowAtIndexPath:(heightForRowAtIndexPathCompletion)heightCompletion wihtDidSelectRowAtIndexPath:(didSelectRowAtIndexPathCompletion)didCompletion;

///  自定义cell 方法
-(void)zyCellForRowAtIndexPathCompletion:(cellForRowAtIndexPathCompletion)completion;
///  修改行高 方法
-(void)zyHeightForRowAtIndexPathCompletion:(heightForRowAtIndexPathCompletion)completion;
/// 需要实现删除方法
-(void)zyCanEditRowAtIndexPath:(canEditRowAtIndexPath)completion;
///  cell点击方法
-(void)zyDidSelectRowAtIndexPathCompletion:(didSelectRowAtIndexPathCompletion)completion;
-(void)zyDidDeselectRowAtIndexPathCompletion:(didDeselectRowAtIndexPathCompletion)completion;



@end
